package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CarOrderAfterSaleMapper;
import com.ruoyi.system.domain.CarOrderAfterSale;
import com.ruoyi.system.service.ICarOrderAfterSaleService;

/**
 * 退款售后Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-09
 */
@Service
public class CarOrderAfterSaleServiceImpl implements ICarOrderAfterSaleService 
{
    @Autowired
    private CarOrderAfterSaleMapper carOrderAfterSaleMapper;

    /**
     * 查询退款售后
     * 
     * @param id 退款售后主键
     * @return 退款售后
     */
    @Override
    public CarOrderAfterSale selectCarOrderAfterSaleById(Long id)
    {
        return carOrderAfterSaleMapper.selectCarOrderAfterSaleById(id);
    }

    /**
     * 查询退款售后列表
     * 
     * @param carOrderAfterSale 退款售后
     * @return 退款售后
     */
    @Override
    public List<CarOrderAfterSale> selectCarOrderAfterSaleList(CarOrderAfterSale carOrderAfterSale)
    {
        return carOrderAfterSaleMapper.selectCarOrderAfterSaleList(carOrderAfterSale);
    }

    /**
     * 新增退款售后
     * 
     * @param carOrderAfterSale 退款售后
     * @return 结果
     */
    @Override
    public int insertCarOrderAfterSale(CarOrderAfterSale carOrderAfterSale)
    {
        carOrderAfterSale.setCreateTime(DateUtils.getNowDate());
        return carOrderAfterSaleMapper.insertCarOrderAfterSale(carOrderAfterSale);
    }

    /**
     * 修改退款售后
     * 
     * @param carOrderAfterSale 退款售后
     * @return 结果
     */
    @Override
    public int updateCarOrderAfterSale(CarOrderAfterSale carOrderAfterSale)
    {
        carOrderAfterSale.setUpdateTime(DateUtils.getNowDate());
        return carOrderAfterSaleMapper.updateCarOrderAfterSale(carOrderAfterSale);
    }

    /**
     * 批量删除退款售后
     * 
     * @param ids 需要删除的退款售后主键
     * @return 结果
     */
    @Override
    public int deleteCarOrderAfterSaleByIds(Long[] ids)
    {
        return carOrderAfterSaleMapper.deleteCarOrderAfterSaleByIds(ids);
    }

    /**
     * 删除退款售后信息
     * 
     * @param id 退款售后主键
     * @return 结果
     */
    @Override
    public int deleteCarOrderAfterSaleById(Long id)
    {
        return carOrderAfterSaleMapper.deleteCarOrderAfterSaleById(id);
    }
}
